import { createApp, type App } from 'vue'
import AppComponent from './App.vue'
import './public-path'

let app: App
function render(props?: any) {
  app = createApp(AppComponent)
  app.mount(props.container || '#app')
}

if (!window.__POWERED_BY_QIANKUN__) {
  render({});
}


console.log('::: micro app two')

export async function bootstrap() {
  console.log('bootstrap')
}

export async function mount(props: any) {
  console.log('mount')
  render(props)
}

export async function unmount() {
  console.log('unmount')
  app.unmount()
}